package com.xxrl.shop.domain;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.MongoId;

import javax.persistence.EntityListeners;
import java.io.Serializable;

/**
 * @author mis
 */
@Data
@Document(collection = "role_path")
@EntityListeners(AuditingEntityListener.class)
public class SysPermission implements Serializable {

    @MongoId
    private String id;

    @Field
    private String role;

    @Field
    private String path;

    @CreatedDate
    @Field
    private Long createTime;

    @LastModifiedDate
    @Field
    private Long lastModifiedTime;
}
